﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Text;
using System.IO;
using System.Xml;
using System.Data;
using Gift.WebApp;
using Gift.Model;
using Gift.DAL;

public partial class cn_news_center_news_detail : BasePage
{
    // Fields
    readonly DALArticle theArticle = new DALArticle();

    // Methods
    protected StringBuilder ArticleBind()
    {
        StringBuilder builder = new StringBuilder();
        try
        {
            builder.AppendLine("<div class=\"article\">");
            if (base.Request.QueryString["id"] != null)
            {
                tbArticle oArticle = this.theArticle.GetModel(Convert.ToInt32(base.Request.QueryString["id"]));
                if (oArticle != null)
                {
                    builder.AppendLine("<h1>" + oArticle.articleTilte + "</h1>");
                    builder.AppendLine(string.Concat(new object[] { "<span class=\"time\">发布时间：<strong>",oArticle.createTime.ToString("yyyy-MM-dd HH:mm:ss"), "</strong> 点击率：<strong>", oArticle.clickCount, "</strong>作者：<strong>",oArticle.author, "</strong></span>" }));
                    builder.AppendLine("<p>" + oArticle.articleContent + "</p>");
                }
            }
            builder.AppendLine("</div>");
        }
        catch
        {
        }
        return builder;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
